-
Notifications
You must be signed in to change notification settings - Fork 583
[New Rule] Potential Kubectl Masquerading #4832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Rule: New - GuidelinesThese guidelines serve as a reminder set of considerations when proposing a new rule. Documentation and Context
Rule Metadata Checks
New BBR Rules
Testing and Validation
|
⛔️ Test failed Results
|
" *describe secret*", " *describe configmap*", " *describe clusterrole*", " *describe ingress*", | ||
|
||
// exec commands | ||
" *exec -it*", " *exec --stdin*", " *exec --tty*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These may be susceptible to FPs due to the usage of these in other container management tools, however, if this is the case I will either remove or modify them.
⛔️ Test failed Results
|
Starting the rule tests ... |
UpdateAfter an update to fix logic issue by @w0rk3r this PR will go back to the drawing board. Will get it updated soon. |
Summary
This rule detects potential kubectl masquerading activity by monitoring for process events where the process name is not "kubectl" but the command line arguments include kubectl-related commands. This could indicate an adversary attempting to masquerade as legitimate kubectl activity to evade detection. This rule covers evasion gaps introduced by renaming the kubectl binary.
Telemetry
An endpoint rule was tuned to contain kubectl copy/move activity. This will further reduce evasion capabilities related to kubectl usage, as this is a common red teamers' trick.
In my own stack, 0 hits last 365 day. In telemetry, 0 hits last 30d. If this gets noisy, I will just remove/modify the noisy patterns.